package practise;

public class ToLowerCase {
    public static void toLowerCase(String s) {
        StringBuffer ret = new StringBuffer();
        StringBuffer ret2 = new StringBuffer();
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            char c2 = c;
            if(c >= 'A' && c <= 'Z') {
                c = (char)(c - 'A' + 'a');
                c2 -= 'A' + 'a';//error
            }
            ret.append(c);
            ret2.append(c2);
        }
        System.out.println(ret);
        System.out.println(ret2);

//        return ret.toString();
    }

    public static void main(String[] args) {
       toLowerCase("Hello");
    }
}
